<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>书单</title>
    <link rel="stylesheet" th:href="@{/style.css}"></link>
</head>
    <body>
        <h2>这是您的阅读书单</h2>
        <div th:unless="${#lists.isEmpty(books)}">
            <dl th:each="book : ${books}">
                <dt class="bookHeadline">
                    <span th:text="${book.title}">本书</span> by
                    <span th:text="${book.author}">作者</span>
                    (书单号: <span th:text="${book.isbn}">——</span>)
                </dt>
                <dd class="bookDescription">
                  <span th:if="${book.description}"
                        th:text="${book.description}">描述</span>
                    <span th:if="${book.description eq null}">
                        暂无任何简介</span>
                </dd>
            </dl>
        </div>
        <div th:if="${#lists.isEmpty(books)}">
            <p>您的阅读书单空空如也，快去添加一本书吧！</p>
        </div>


        <hr/>

        <h3>添加一本书到书单</h3>
        <form method="POST">
            <label for="title">书名:</label>
            <input type="text" name="title" size="50"></input><br/>
            <label for="author">作者:</label>
            <input type="text" name="author" size="50"></input><br/>
            <label for="isbn">书号:</label>
            <input type="text" name="isbn" size="15"></input><br/>
            <label for="description">简介:</label><br/>
            <textarea name="description" cols="80" rows="5"></textarea>
            <br/>
            <input type="submit"></input>
        </form>
    </body>
</html>